package com.thm.tfast.modules.sys.model.dto.organization;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * @author THM
 * @date 2022/10/29
 * @desc 组织机构新增dto
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class OrganizationInsertDto {

    @ApiModelProperty(value = "父级ID 0-没有父级")
    private Long parentId;

    @ApiModelProperty(value = "层级 0-为顶级")
    private Integer level;

    @ApiModelProperty(value = "组织机构名称", required = true)
    @NotEmpty(message = "组织机构名称不能为空")
    @Size(max = 36, message = "组织机构名称不能超过36位")
    private String name;

    @ApiModelProperty(value = "排序")
    private Integer sort;
}
